package com.luoxiang.lib_common.utils;

import android.app.Activity;
import android.os.Build;
import android.view.View;

/**
 * @Description TODO
 * @systemUser Administrator
 * @Author LiangXin
 * @Date 08-24-2022 周三 18:28
 */
public class StatusBarFontUtil {
    /** * 黑色字体状态栏 * @param activity */ public static void setLightStatusBarColor(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            activity.getWindow()
                    .getDecorView()
                    .setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }
    }
    /** * 白色字体状态栏 * @param activity */ public static void setWhiteStatusBarColor(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            activity.getWindow()
                    .getDecorView()
                    .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
        }
    }
}
